
//  VCRouter.m
//  20240823
//
//  Created by 张伟 on 2024/8/27.
//

#import "VCRouter.h"
#import "LoginController.h"
#import "ZWNavigationController.h"
#import "NewMessageController.h"

@implementation VCRouter

+ (void)toLoginController {

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        LoginController * login = LoginController.new;
        ZWNavigationController * nav = [[ZWNavigationController alloc] initWithRootViewController:login];
        nav.modalPresentationStyle = 0;
        [ZWTools.currentTopViewController presentViewController:nav animated:true completion:nil];
    });
    
}

//+ (void)toNewMessageController {
//    NewMessageController * vc = NewMessageController.new;
//    [ZWTools.currentTopViewController.navigationController pushViewController:vc animated:true];
//}

+ (void)toNewMessageController:(void (^)(void))handle {
    NewMessageController * vc = NewMessageController.new;
    vc.loadDataHandle = handle;
    [ZWTools.currentTopViewController.navigationController pushViewController:vc animated:true];
}


@end
